// 引入当前页面的less
require('../less/advertisement.less')

// 页面加载完毕
document.ready(function () {

    // 获取dom
    let countTime = document.querySelector('#countTime')
    let countDown = document.querySelector('#countDown')
    
    
    let num = 5
    countTime.textContent = num
    let timerId = window.setInterval(function () {
        num--
        if(num === 0){
            // 清除计时器
            clearInterval(timerId)
            // 跳转
            location.href='./register.html'
            return
        }
        countTime.textContent = num
        
    }, 1000)


    // 跳转
    countDown.addEventListener('click',function(){
        // 跳转
        location.href='./register.html'
    })

})






